<%@page pageEncoding="UTF-8"%>
<%@ page import="java.util.List" %>
<%@ page import="oneroom.admin.board.boardModel" %>
<jsp:useBean id="rightBoard" scope="page" class="oneroom.admin.board.boardDao" />
<%
	//쿼리를 돌려서 가지고 오는 값
	List rightlist = rightBoard.getList("1","","", 0, 5);
%>
  <div id="con02">
   <div id="login"> 
  <%if(session.getAttribute("id") == null || session.getAttribute("id") == ""){ %> 
  <a class="a" href="/room/member/login.jsp">로그인</a> | <a class="a" href="/room/member/regi_agr.jsp">회원가입</a>
  <%}else{ %>
  <a class="a" href="/room/member/logout.jsp">로그아웃</a>  | <a class="a" href="/room/member/update.jsp">회원수정</a>
  <br /><a class="a" href="/room/member/room_list.jsp">마이페이지</a>
  <%}%>
  | <a class="a" href="#">사이트맵</a>
 </div>
   <div id ="today" >
    <div class="pt15 pb10"><img src="/room/img/title_today.gif" border="0" usemap="#Map_tmore"/></div>
    <%
	if(rightlist != null && rightlist.size() > 0){
		boardModel rightModel = (boardModel)rightlist.get(0);
	%>  
    <div class="thum02"><img src="/download/<%=rightModel.getAtt_file() %>?name=<%=rightModel.getOrg_file() %>&kind=" width="190" height="141" /> </div>
    <div class="pt15">
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
 <col width="3%;" /><col width="97%" />
  <tr>
    <td><img src="/room/img/icon_point.gif" /></td>
    <td  class="lh"><a class="b" href="/room/board/view.jsp?searchBoard=1&data_id=<%=rightModel.getData_id()%>"><%=rightModel.getTitle() %></a></td>
  </tr>    
    <%
		if(rightlist.size() > 1){    
			for(int i = 1; i<rightlist.size(); i++){
				boardModel rightModel1 = (boardModel)rightlist.get(i);
	%>  
	<tr>
	  <td><img src="/room/img/icon_point.gif" /></td>
	  <td  class="lh"><a class="b" href="/room/board/view.jsp?searchBoard=1&data_id=<%=rightModel1.getData_id()%>"><%=rightModel1.getTitle() %></a></td>
	</tr>
	<%
			}
		}
	%>
    <%
	}else{
	%>
    <div class="thum02"><img src="/room/img/thum_sample02.jpg" width="190" height="141" /> </div>
    <div class="pt15">	
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
 <col width="3%;" /><col width="97%" />
	<tr><td colspan="2">등록된 내용이 없습니다.</td></tr>
	<%
	}
	%>
</table>
   </div>
   
  <!-------------배너영역----------> 
  <div id="banner">
   <div><img src="/room/img/banner01.gif"/></div>
   <div class="pt10"><img src="/room/img/banner02.gif"/></div>
   <div class="pt10"><img src="/room/img/banner03.gif"/></div>
  </div> 
  </div>
</div>
 </div>